<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="vue-2.4.0.js" ></script>
</head>

<style>

    #tab{
        width:800px;
        border-collapse: collapse;
        margin: 20px auto;
    }
    #tab th{
        background-color: #0094ff;
        color: white;
        border: solid  black 2px;
        text-align: center;
    }

    #tab td{
        border: solid  black 2px;
        text-align: center;
    }

</style>
<body>
       
    <div id="app">
        
        <table id="tab">
            <tr>
                <th>Id</th>
                <th>名字</th>
                <th>年龄</th>
                <th>时间</th>
                <th>操作</th>
            </tr>
            <tr v-if="list.length == 0">
                <td colspan="4">此列表无数据</td>
            </tr>

            <tr v-for="item in list">
                <td>{{item.id}}</td>
                <td>{{item.name}}</td>
                <td>{{item.age}}</td>
                <td>{{item.ctime}}</td>
                <td><a href="">删除</a></td>
            </tr>

        </table>
    </div>
</body>

<script>
    var vm = new Vue({
        el:'#app',
        data:{
            list:[{id:1,name:'小明',age:'28',ctime:new Date()},{id:1,name:'小明',age:'28',ctime:new Date()}]
        },
    });

</script>
</html>